<template>
<el-button type="primary" plain icon="Plus" @click="handleAdd">新增</el-button>
<el-tabs type="border-card" class="demo-tabs" style="margin-top:20px;">
    <el-tab-pane>
      <template #label>
        <span class="custom-tabs-label">
          <el-icon><Position/></el-icon>
          <span>当月OKR考核</span>
        </span>
      </template>
      <MonthOkr></MonthOkr>
    </el-tab-pane>
    <el-tab-pane label="历史OKR考核">
        
    </el-tab-pane>
  </el-tabs>
<OkrDialog v-model="DialogVisible" :id="id"></OkrDialog>
</template>


<script setup>
import {ref, onMounted,onBeforeMount, reactive} from "vue";
import { Timer } from '@element-plus/icons-vue';
import {useRouter} from "vue-router";
import {} from '@/api/api'
import { ElMessage } from 'element-plus'
import OkrDialog from './components/okrDialog'
import MonthOkr from './components/monthOkr'
onBeforeMount(()=>{

})

const DialogVisible=ref(false)
const handleAdd= row => {
  DialogVisible.value = true
}
const handleDelete = (index, row) => {
};

const router = useRouter()
const onShowClick = row => {
  router.push({
    path: '/performance/edit',
    query: row
  })
}

const startPositionFlow = (index, row) => {
  let positionId=row.id
  startFlow({positionId}).then(data=>{
    if(data.code==200){
      ElMessage({
        message: '发布成功',
        type: 'success',
      })
      PositionList.value[index].auditStatus=1
    }
  })
};
</script>

<style lang="scss" scoped>

</style>
